package com.wuster.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wuster.entity.po.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


/**
 * 用户表
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    /**
     * 按手机号查询用户
     * @param number
     * @return
     */
    User getUserByPNumber(String number);

    /**
     * 按姓名模糊查询用户
     * @param page
     * @param name
     * @return
     */
    @Select("SELECT * FROM user  WHERE user_name LIKE CONCAT('%', #{name}, '%')")
    Page<User> getInfoByName(Page<User> page, String name);
}